package deployr.core;


public class JettyDriver {

	private final Wars wars;
	private final JettyContexts contexts;

	public JettyDriver(Wars wars, JettyContexts contexts) {
		this.wars = wars;
		this.contexts = contexts;
	}

	public void deploy(String appId) {
		wars.copyFromOriginToTarget(appId);
		contexts.add(appId);
	}

	public void undeploy(String appId) {
		contexts.remove(appId);
		wars.deleteTarget(appId);
	}

}